#ifndef __USER_H__
#define	__USER_H__

#include "list.h"
#include "util.h"
#include "lru.h"
#include "db.h"
#include "item.h"
#include "summon.h"

struct user {
	int	id;
	char	*name;
	int 	sex;
	int 	school;
	int	hp;
	int	mp;
	int	hp_eff;
	int	strong;
	int	wisdom;
	int	physique;
	int	agile;
	int	wen;
	char	*skill;
	char	*face;
	char	*equip_a;
	char	*equip_b;
	char	*equip_c;
	char	*equip_d;
	char	*equip_e;
	char	*equip_f;
	char	*equip_g;

	struct list_head summons;
	struct list_head items;
	struct list_head lru;
	struct list_head hash_list;
};

struct user * new_user(int id, char *name, int sex, int school, int hp, int hp_eff,
			int mp, int strong, int wisdom,int physique, int agile, 
			int wen, char *skill, char *face, char *equip_a,
			char *equip_b, char *equip_c, char *equip_d,
			char *equip_e, char *equip_f, char *equip_g);

struct user *get_user(int id);
int add_user_item(struct user *user, struct item *item);

#endif
